package com.project.restaurant.order.typehandler;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.project.restaurant.order.enums.OrderState;

public class OrderStateTypeHandler extends JacksonTypeHandler {

    public OrderStateTypeHandler() {
        super(OrderState.class);
    }

    @Override
    protected Object parse(String json) {
        return OrderState.getOrderState(Integer.parseInt(json));
    }
}
